package inheritance_package;


class A {
	public void show()
	{
		System.out.println("A");
	}
}

class B extends A {
	public void show()
	{
		System.out.println("B");
	}
}

public class test 
{
	public static void main(String[] args) 
	{
		A a1 = new A();
		A a2 = new B();
		B a3 = new B();

		try
		{
			a1.show();
			a2.show();
		}
		catch (Exception e) 
		{
			e.printStackTrace();
		}
		a3.show();

	}
}
